// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 

package com.anda.driver.util;

import org.apache.http.HttpEntity;

// Referenced classes of package com.anda.driver.util:
//			StreamUtil

public class HTMLUtil
{

	public HTMLUtil()
	{
	}

	public static String getCharset(HttpEntity httpentity)
	{
		String s = null;
		if (httpentity != null)
			try
			{
				s = httpentity.getContentType().getValue().split(";")[1].split("=")[1];
			}
			catch (Exception exception)
			{
				exception.printStackTrace();
			}
		return s;
	}

	public static String getContent(HttpEntity httpentity)
	{
		try {
			if (httpentity != null) {
				return StreamUtil.getString(httpentity.getContent(), getCharset(httpentity));
			}
		} catch (Exception e){
			e.printStackTrace();
		}
		return null;
		
	}
}
